package com.lv.suyiyong.hfrbusines.ui

import android.view.View
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.lv.common.base.BaseActivity
import com.lv.common.utils.ARoutUtils
import com.lv.common.utils.StatusBarUtil
import com.lv.suyiyong.hfrbusines.R
import com.lv.suyiyong.hfrbusines.databinding.ActivityUserinfoCollectionBinding


/**
 * 作者： ygx
 * 创建日期：2023/5/6 10:33 AM
 * 签名： 天行健，君子以自强不息；地势坤，君子以厚德载物。
 * -    _              _           _     _   ____  _             _ _
 * -   / \   _ __   __| |_ __ ___ (_) __| | / ___|| |_ _   _  __| (_) ___
 * -  / _ \ | '_ \ / _` | '__/ _ \| |/ _` | \___ \| __| | | |/ _` | |/ _ \
 * - / ___ \| | | | (_| | | | (_) | | (_| |  ___) | |_| |_| | (_| | | (_) |
 * -/_/   \_\_| |_|\__,_|_|  \___/|_|\__,_| |____/ \__|\__,_|\__,_|_|\___/
 * <p>
 * You never know what you can do until you try !
 * ----------------------------------------------------------------
 * 描述：已收集个人信息清单
 */
@Route(path = ARoutUtils.UserInfoCollectActivity)
class UserInfoCollectActivity : BaseActivity<ActivityUserinfoCollectionBinding>(),
    View.OnClickListener {

    override fun getLayoutRes() = R.layout.activity_userinfo_collection
    override fun initView() {
        super.initView()
        initStatusBar(this, true, true)
        mBinding.apply {

            StatusBarUtil.setHeightAndPadding(this@UserInfoCollectActivity, titleBar)
            titleBar.onClickBackIcon { finish() }
            titleBar.setTitle("已收集个人信息清单")
            llAccount.setOnClickListener(this@UserInfoCollectActivity)
            llUse.setOnClickListener(this@UserInfoCollectActivity)
            llDevices.setOnClickListener(this@UserInfoCollectActivity)
        }
    }


    override fun initConfig() {
        super.initConfig()
    }


    override fun initData() {
        super.initData()

    }

    override fun onClick(p0: View?) {
        when (p0?.id) {
            R.id.ll_account -> {
                ARouter.getInstance().build(ARoutUtils.UserinfoCollectionDetailsActivity)
                    .withString("type", "0")
                    .navigation()
            }
            R.id.ll_use -> {
                ARouter.getInstance().build(ARoutUtils.UserinfoCollectionDetailsActivity)
                    .withString("type", "1")
                    .navigation()

            }
            R.id.ll_devices -> {
                ARouter.getInstance().build(ARoutUtils.UserinfoCollectionDetailsActivity)
                    .withString("type", "2")
                    .navigation()

            }

        }
    }

}